From: robertl Date: Tue, 16 Feb 2010 02:49:43 +0000 (+0000) Subject: Add menu option to manually check for update. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~199^2~54 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=340851cc2c8002cf4e13af25cf3c7e0692034426;p=gpsbabel.git Add menu option to manually check for update. --- diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 42b5a8836..7569d71f9 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -// $Id: mainwindow.cpp,v 1.16 2010/02/15 02:57:00 robertl Exp $ +// $Id: mainwindow.cpp,v 1.17 2010/02/16 02:49:43 robertl Exp $ //------------------------------------------------------------------------ // // Copyright (C) 2009 S. Khai Mong . @@ -132,6 +132,7 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent) connect(ui.actionQuit, SIGNAL(triggered()), this, SLOT(closeActionX())); connect(ui.actionHelp, SIGNAL(triggered()), this, SLOT(helpActionX())); connect(ui.actionAbout, SIGNAL(triggered()), this, SLOT(aboutActionX())); + connect(ui.actionUpgradeCheck, SIGNAL(triggered()), this, SLOT(upgradeCheckActionX())); connect(ui.actionPreferences, SIGNAL(triggered()), this, SLOT(preferencesActionX())); connect(ui.inputFormatCombo, SIGNAL(currentIndexChanged(int)), @@ -172,8 +173,8 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent) //--- Restore from registry restoreSettings(); + upgrade = new UpgradeCheck(parent, formatList); if (bd.startupVersionCheck) { - upgrade = new UpgradeCheck(parent, formatList); upgrade->checkForUpgrade(babelVersion, bd.upgradeCheckMethod, bd.upgradeCheckTime, bd.installationUuid, bd.reportStatistics); @@ -961,6 +962,14 @@ void MainWindow::aboutActionX() aboutDlg.exec(); } +//------------------------------------------------------------------------ +void MainWindow::upgradeCheckActionX() +{ + upgrade->checkForUpgrade(babelVersion, bd.upgradeCheckMethod, + QDateTime(), bd.installationUuid, + bd.reportStatistics); +} + //------------------------------------------------------------------------ void MainWindow::preferencesActionX() { diff --git a/gui/mainwindow.h b/gui/mainwindow.h index 09d7713da..d8c0b0210 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -1,5 +1,5 @@ // -*- C++ -*- -// $Id: mainwindow.h,v 1.8 2010/02/14 21:29:06 robertl Exp $ +// $Id: mainwindow.h,v 1.9 2010/02/16 02:49:43 robertl Exp $ //------------------------------------------------------------------------ // // Copyright (C) 2009 S. Khai Mong . @@ -105,6 +105,7 @@ protected: void outputOptionButtonClicked(); void preferencesActionX(); void resetFormatDefaults(); + void upgradeCheckActionX(); }; diff --git a/gui/mainwinui.ui b/gui/mainwinui.ui index 62b123243..4f6e108ae 100644 --- a/gui/mainwinui.ui +++ b/gui/mainwinui.ui @@ -641,6 +641,7 @@ + @@ -666,6 +667,11 @@ Preferences... + + + Check for Upgrade + +